<?php

mysql_connect("localhost","localhost","hostlocal");

mysql_select_db("vircast");

	$fh = fopen('debug','a');
	fwrite($fh,"1 done! from add_messages.php\n");
	fclose($fh);

$uid = $_REQUEST['uid'];
$latitude = $_REQUEST['latitude'];
$longitude = $_REQUEST['longitude'];
$subject = $_REQUEST['subject'];
$message = $_REQUEST['message'];
$priority = $_REQUEST['priority'];
$timeout = $_REQUEST['timeout'];
$radius = $_REQUEST['radius'];
$category = $_REQUEST['category'];

$query ="INSERT INTO user_message (uid,latitude,longitude,subject,message,priority,timeout,radius,category) values ('".$uid."','".$latitude."','".$longitude."','".$subject."','".$message."','".$priority."','".$timeout."','".$radius."','".$category."')"; 
	$fh = fopen('debug','a');
	fwrite($fh,"$query\n");
	fclose($fh);

mysql_query($query);

	$fh = fopen('debug','a');
	fwrite($fh,"2 done! from add_messages.php\n");
	fclose($fh);
mysql_close();
?>

